/*
 * Amendment History:
 * 
 * Date       By         Description 
 * ----------------------------------------------- 
 * 2009/12/1 Anselm Hou    Create the class
 */
package com.inibb.app.util.io;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;


/**
 *  
 * Helper class for StatusFile
 * 
 * @author anselm
 * @since  Sep 30, 2009
 * @version 1.0
 */
public class StatusFileNameUtil
{

   /**
    * Format the status file name
    * @param oriFileName Original file name
    * @return Formatted file name
    */
   public static String formatStatusFileName(String oriFileName){
      StringBuffer buf=new StringBuffer();
      
      SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmssSS");
      sdf.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));
      String dateS=sdf.format(new Date());
      
      buf.append(dateS);
      buf.append("-");
      buf.append(oriFileName);
      
      return buf.toString();
   }
   
   /**
    * Construct for JobFileNameUtil
    */
   private StatusFileNameUtil()
   {
      super();
   }
}

